﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZOVNP.Model.Abstracts;

namespace ZOVNP.WinView.Workplaces.Administrator
{
    public class ProductTypeNode : TreeNode
    {
        private IProductType _productType;

        public ProductTypeNode(IProductType productType)
        {
            ProductType = productType;
        }

        public IProductType ProductType
        {
            get { return _productType; }
            set
            {
                _productType = value;
                Text = _productType.Name;
                Name = _productType.Name;
            }
        }

    }

    public class ProductNode : TreeNode
    {
        private IProduct _product;

        public ProductNode(IProduct product)
        {
            Product = product;
        }

        public IProduct Product
        {
            get { return _product; }
            set
            {
                _product = value;
                Text = _product.Name;
                Name = _product.Name;
            }
        }
    }
}
